import request from '@/utils/request'
import {parseStrEmpty} from "@/utils/lanling";

// 查询列表
export function listPayConfig(query) {
  return request({
    url: '/system/app/payConfig/page',
    method: 'get',
    params: query
  })
}

export function getPayCompanyList() {
  return request({
    url: '/system/app/payConfig/getPayCompanyList',
    method: 'get',
  })
}

// 查询列表
export function list(query) {
  return request({
    url: '/system/app/payConfig/list',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getPayConfig(id) {
  return request({
    url: '/system/app/payConfig/' + parseStrEmpty(id),
    method: 'get'
  })
}

// 新增
export function addPayConfig(data) {
  return request({
    url: '/system/app/payConfig',
    method: 'post',
    data: data
  })
}

// 修改
export function updatePayConfig(data) {
  return request({
    url: '/system/app/payConfig',
    method: 'put',
    data: data
  })
}

// 状态修改
export function changeStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/system/app/payConfig/changeStatus',
    method: 'put',
    data: data
  })
}

// 删除
export function delPayConfig(id) {
  return request({
    url: '/system/app/payConfig/' + id,
    method: 'delete'
  })
}


